import { Component, OnInit } from '@angular/core';
import {ActivatedRoute} from '@angular/router';

@Component({
  selector: 'app-text-frist',
  templateUrl: './text-frist.component.html',
  styleUrls: ['./text-frist.component.css']
})
export class TextFristComponent implements OnInit {
  public str: string;
  constructor(private route: ActivatedRoute) { }

  ngOnInit() {
    this.route.params.subscribe((param) => {
      this.str = param.name;
    });
  }

}
